#include "Climbing.h"
#include "../Robotmap.h"

Climbing::Climbing() : Subsystem("Climbing")
,thePopperUp(POPPER_SOLENOID), thePopperDown(POPPER_SOLENOID_DOWN), thePuller(PULLER_SOLENOID){
	thePopperDown.Set(true);
	thePopperUp.Set(false);
	thePuller.Set(false);
	pullerNotifier = new Notifier(TimerEventHandler(Climbing::PullUpClimber),
				(void*) this);
	popperNotifier = new Notifier(TimerEventHandler(Climbing::PopUpClimber),
			(void*) this);
}
    
void Climbing::InitDefaultCommand() {
	// Set the default command for a subsystem here.
	//SetDefaultCommand(new MySpecialCommand());
}
void Climbing::KeepPopperDown() {
	thePopperUp.Set(false);
	thePopperDown.Set(true);
}

void Climbing::PopUpClimber(void * handle ){
	Climbing* climber = (Climbing*) handle;
	climber->thePopperUp.Set(true);
	climber->thePopperDown.Set(false);
//	CommandBase::shooterAngle->SetSetpoint(8);
//	CommandBase::shooter->flipper.Set(true);

}
void Climbing::PullUpClimber(void * handle){
	Climbing* climber = (Climbing*) handle;
	climber->thePuller.Set(true);
	CommandBase::shooter->flipper.Set(false);
	CommandBase::shooterAngle->SetSetpoint(8);

}
// Put methods for controlling this subsystem
// here. Call these from Commands.
